<!doctype html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible">
<title><?=h($title);?>【大连婚宴酒店】- 速订客婚宴频道</title>
<meta content="<?=h($keywords);?>" name="keywords">
<meta content="<?=h($description);?>" name="description">
<link type="text/css" rel="stylesheet" href="<?=STATIC_URL;?>css/base.css">
<style>
.thumb_area01 {
    background-color: #000000;
    height: 500px;
    margin: 0 auto;
    overflow: hidden;
    padding: 10px;
    position: relative;
    z-index: 1;
}
.thumb_area01 .thumb_list {
    height: 480px;
    margin: 10px auto 0;
    overflow: hidden;
    position: relative;
    width: 970px;
}
.thumb_area01 .txtImg_list {
    clear: both;
    overflow: hidden;
    position: relative;
    width: 9999px;
}
.thumb_area01 .txtImg_list li {
    display: table-cell;
    height: 480px;
    line-height: 480px;
    margin-top: 0;
    text-align: center;
    vertical-align: middle;
    width: 970px;
}
.thumb_area01 .txtImg_list li img {
    max-height: 480px;
    max-width: 970px;
    vertical-align: middle;
}
.thumb_area01 .scroll_btn {
    height: 500px;
    left: 10px;
    position: absolute;
    top: 0;
    width: 970px;
    z-index: 8;
}
.thumb_area01 .scroll_btn a {
    background-image: url("");
    display: block;
    float: left;
    height: 500px;
    width: 485px;
}
.thumb_area01 .scroll_btn a i {
    height: 84px;
    line-height: 1500px;
    overflow: hidden;
    position: absolute;
    top: 215px;
    width: 84px;
}
.thumb_area01 .scroll_btn a:hover i {
    background: url("http://script.daoxila.com/root/img/img_20111201/arrows.png") repeat scroll 0 0 transparent;
}
.thumb_area01 .scroll_btn .pre_btn:hover i {
    background-position: left -84px;
    left: 0;
}
.thumb_area01 .scroll_btn .next_btn:hover i {
    background-position: left top;
    right: 0;
}
</style>
</head>

<body>
<? include 'com-header.tpl.php'; ?>
<? $name = $hotel['name'].($hotel['alias_name']?'('.$hotel['alias_name'].')':''); ?>
<!-- end head -->
<div id="container">
  <div class="other_position"><a href="http://www.sudingke.com" class="home">速订客</a><span>»</span><a href="/hotel" title="大连婚宴网">婚宴酒店</a><span>»</span><a href="/hotel<?=i($hotel['shop_id']);?>"><?=$name;?></a><span>»</span>查看大图</div>
  <div class="thumb_area01">
    <div class="scroll_btn">
        <a class="pre_btn prev_a" hidefocus="true" href="javascript:void(0);" title="上一页"><i></i></a>
        <a class="next_btn next_a" hidefocus="true" href="javascript:void(0);" title="下一页"><i></i></a>
    </div>
    <div class="thumb_list">
        <ul class="txtImg_list clearfix" id="Img_lists">
    <?php foreach($hotel['albums'] as $album){ ?>
            <li><img src="<?=UPLOAD_URL.$album['picture'];?>" alt="<?=$name.' '.$album['name'];?>" /></li>
    <?php } ?>
        </ul>
    </div>
  </div>
</div>

<!------------------------------------>
<? include 'com-footer.tpl.php'; ?>
<!------------------------------------>
<script type="text/javascript" src="<?=STATIC_URL;?>js/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(function() {
    function marquee( parentEl, num ) {
        //配置变量
        var config = {
            showNum : num,                                      //设置滚动的显示个数
            autoScroll : false,                                 //是否自动滚动，默认为 false
            autoScrollInterval : 3000                           //自动滚动间隔，默认为 3000 毫秒，autoScroll = true 时才有效
        }
        var txtImgListLiWidth = $('.txtImg_list li', parentEl).width(), //单个 li 的宽度
            txtImgListLeft = 0,                                 //.txtImg_list 初使化时的 left 值为 0
            prevAllow = true,                                   //为了防止连续点击上一页按钮
            nextAllow = true;                                   //为了防止连续点击下一页按钮


        //计算父容量限宽
        $('.thumb_list', parentEl).width(config.showNum * txtImgListLiWidth);

        //点击上一页
        $('.prev_a', parentEl).click(function() {
            if (prevAllow) {
                prevAllow = false;
                txtImgListLeft = txtImgListLeft - txtImgListLiWidth;
                $('.txtImg_list', parentEl).css('left', txtImgListLeft);
                //复制最后一个 li 并插入到 ul 的最前面
                $('.txtImg_list li:last-child', parentEl).clone().prependTo($('.txtImg_list', parentEl));
                //删除最后一个 li
                $('.txtImg_list li:last-child', parentEl).remove();
                $('.txtImg_list', parentEl).animate({
                    left : txtImgListLeft + txtImgListLiWidth
                }, 300, function() {
                    txtImgListLeft = parseInt($('.txtImg_list', parentEl).css('left'), 10);
                    prevAllow = true;
                })
            }
        });

        //点击下一页
        $('.next_a', parentEl).click(function() {
            if (nextAllow) {
                nextAllow = false;
                $('.txtImg_list', parentEl).animate({
                    left : txtImgListLeft - txtImgListLiWidth
                }, 300, function() {
                    txtImgListLeft = parseInt($('.txtImg_list', parentEl).css('left'), 10);
                    txtImgListLeft = txtImgListLeft + txtImgListLiWidth;
                    $('.txtImg_list', parentEl).css('left', txtImgListLeft);
                    //复制第一个 li 并插入到 ul 的最后面
                    $('.txtImg_list li:first-child', parentEl).clone().appendTo($('.txtImg_list', parentEl));
                    //删除第一个 li
                    $('.txtImg_list li:first-child', parentEl).remove();
                    nextAllow = true;
                })
            }
        });

        //自动滚动
        if (config.autoScroll) {
            //每 N 毫秒模拟一次点击 .next_a 事件
            setInterval(function() {
                $('.next_a', parentEl).trigger('click');
            }, config.autoScrollInterval)
        }
    }
    marquee( $('.thumb_area'), 3);
    marquee( $('.tb_thumb'), 9);
    marquee( $('.thumb_area01'), 1);
});
</script>
</body>
</html>